
//
//  ME_dingDanBtn.m
//  ShangChengMoBan
//
//  Created by 张铁军 on 16/8/25.
//  Copyright © 2016年 ping. All rights reserved.
//

#import "ME_dingDanBtn.h"

@implementation ME_dingDanBtn


-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    return self;
}

-(void)initView{
    _tapBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height)];
    [self addSubview:_tapBtn];
    
    _tuBiaoImage = [[UIImageView alloc]initWithFrame:CGRectMake(20 * _kscH, 20 * _kscH, 24 * _kscW, 24 * _kscW)];
    [self addSubview:_tuBiaoImage];
    
    _titleLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(0, _tuBiaoImage.bottom + 10 * _kscH, self.width, 16 * _kscH)andFont:PuTongFont];
    _titleLabel.text = @"代收货";
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    _titleLabel.textColor = MaintextColor;
    [self addSubview:_titleLabel];
    
    _biaoQianLabel = [[ UILabel alloc]initWithFrame:CGRectMake(_tuBiaoImage.right - 5 * _kscW, _tuBiaoImage.top - 5 * _kscW , 10 * _kscW, 10 * _kscW)];
    _biaoQianLabel.backgroundColor = [UIColor redColor];
    _biaoQianLabel.textColor = [UIColor whiteColor];
    _biaoQianLabel.font = [UIFont systemFontOfSize:8];
    _biaoQianLabel.textAlignment = NSTextAlignmentCenter;
    _biaoQianLabel.layer.cornerRadius = 5 * _kscW;
    _biaoQianLabel.clipsToBounds = YES;
    _biaoQianLabel.text = @"10";
    [self addSubview:_biaoQianLabel];
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
